package com.bestcem.xm.member.grpc.service.param.extendfield;

import com.bestcem.xm.common.core.constant.RegTypes;
import com.bestcem.xm.member.enums.ExtendFieldTypeEnum;
import com.bestcem.xm.member.enums.MemberTypeEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * @author dc.wang <dc.wang@idiaoyan.com>
 * @version V1.0
 * @description TODO
 * @date 2021/7/21
 */
@Getter
@Setter
@ToString
public class UpdateFieldParam {
    /**
     * 联系人类型
     */
    @NotNull
    private MemberTypeEnum memberTypeEnum;

    /**
     * 扩展字段标识
     */
    @NotNull
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "企业标识格式错误")
    private String id;

    /**
     * 扩展字段名
     */
    @NotBlank
    private String name;

    /**
     * 扩展字段类型
     */
    @NotNull(message = "扩展字段类型异常")
    private ExtendFieldTypeEnum extendFieldTypeEnum;

    /**
     * 扩展字段创建集合
     */
    private List<InsertEnumItemParam> insertEnumItemParams;

    /**
     * 扩展字段更新集合
     */
    private List<UpdateEnumItemParam> updateEnumItemParams;

    /**
     * 删除枚举选项标识集合
     */
    private List<String> deleteEnumItemIds;
}
